package com.example.auth.Common;

import java.util.HashMap;
import java.util.Map;

/**
 * 公共常量
 *
 * @author xinmaosheng
 * @since 2019/5/10 13:59
 **/
public class CommonConstants {

    /**
     * admin用户默认学院管理员角色
     */
    public final static String ADMIN_ROLE = "学院管理员";

    /**
     * 编码格式UTF-8
     */
    public final static String CHARSET_UTF_8 = "UTF-8";

    /**
     * 请求响应成功状态码
     */
    public final static int RESPONSE_CODE = 200;

    /**
     * 记录数0
     */
    public final static int NO_COUNT = 0;
    /**
     * 最大显示条数
     */
    public static final long MAX_LIMIT = 1000;
    /**
     * 默认页码
     */
    public static final long DEFAULT_PAGE = 1;
    /**
     * 默认显示条数
     */
    public static final long DEFAULT_LIMIT = 10;

    /**
     * 门户首页轮播图默认显示条数
     */
    public static final Integer DEFAULT_BANNER_LIMIT = 8;

    /**
     * 门户首页通知公告默认显示条数
     */
    public static final Integer DEFAULT_NOTICE_LIMIT = 3;

    /**
     * 门户首页专区配置默认显示条数
     */
    public static final Integer DEFAULT_REGION_CONFIG_LIMIT = 5;

    /**
     * 门户首页新闻默认显示条数
     */
    public static final Integer DEFAULT_NEWS_LIMIT = 4;

    /**
     * 门户首页视频默认显示条数
     */
    public static final Integer DEFAULT_VIDEO_LIMIT = 8;

    /**
     * 门户首页图书默认显示条数
     */
    public static final Integer DEFAULT_BOOKS_LIMIT = 6;

    /**
     * 定时任务全量参数
     */
    public static final String ALL_PARAM = "ALL";

    /**
     * 门户首页期刊默认显示条数
     */
    public static final Integer DEFAULT_PERIODICAL_LIMIT = 6;

    /**
     * 门户热搜词默认显示个数
     */
    public static final Integer DEFAULT_HOT_SEARCH_LIMIT = 5;

    /**
     * APP首页音频默认显示条数
     */
    public static final Integer DEFAULT_AUDIO_LIMIT = 3;

    /**
     * APP首页音频默认显示条数
     */
    public static final Integer RECOMMEND_AUDIO_LIMIT = 4;

    /**
     * APP首页轮播图默认显示条数
     */
    public static final Integer DEFAULT_BANNER_APP_LIMIT = 8;

    /**
     * APP 首页图书默认显示条数
     */
    public static final Integer DEFAULT_BOOKS_APP_LIMIT = 3;

    /**
     * APP 首页期刊默认显示条数
     */
    public static final Integer DEFAULT_PERIODICAL_APP_LIMIT = 5;

    /**
     * APP首页通知公告默认显示条数
     */
    public static final Integer DEFAULT_NOTICE_APP_LIMIT = 10;

    /**
     * APP首页新闻默认显示条数
     */
    public static final Integer DEFAULT_NEWS_APP_LIMIT = 4;

    /**
     * APP首页最新上架视频默认显示条数
     */
    public static final Integer DEFAULT_NEW_VIDEOS_LIMIT = 8;

    /**
     * APP个人中心视频历史默认显示条数
     */
    public static final Integer DEFAULT_VIDEO_HISTORY_LIMIT = 6;

    /**
     * APP视频大家在看默认显示条数
     */
    public static final Integer DEFAULT_VIDEO_WATCH_LIMIT = 4;

    /**
     * APP视频更多推荐默认显示条数
     */
    public static final Integer DEFAULT_VIDEO_MORE_LIMIT = 4;

    /**
     * APP视频热门榜单top30
     */
    public static final Integer DEFAULT_VIDEO_WATCH_RANKING = 30;

    /**
     * 安全相关
     */
    public final static String JWT_SIGN_KEY = "zjce";

    /**
     * 系统默认顶级父节点
     */
    public final static String SUPER_PARENT_ID = "0";

    /**
     * 超级管理员ID 用于系统默认操作人 定时任务、监听器等另起线程操作数据
     */
    public final static String SUPER_ADMIN_ID = "1";

    /**
     * sys模块名称
     */
    public final static String MODULE_SYS = "sys-service";

    /**
     * user模块名称
     */
    public final static String MODULE_USER = "user-service";

    /**
     * resource模块名称
     */
    public final static String MODULE_RESOURCE = "resource-service";

    public final static String MODULE_PRODUCT = "product-service";

    /**
     * study模块名称
     */
    public final static String MODULE_STUDY = "study-service";

    /**
     * data模块名称
     */
    public final static String MODULE_SOCKET = "data-service";

    /**
     * auth模块名称
     */
    public final static String MODULE_AUTH = "auth-service";

    /**
     * /** 默认密码前缀
     */
    public final static String PASSWORD_PREFIX = "WY@zj";

    /**
     * 默认密码截取手机号后几位
     */
    public static final Integer PASSWORD_PHONE_LAST = 4;

    /**
     * 数据字典根节点key值
     */
    public final static String TOP_KEY = "-1";

    /**
     * 搜索框"全部"的值
     */
    public final static String ALL_TYPE = "-1";

    /**
     * 队首标识
     */
    public static final String LIST_HEAD = "0";

    /**
     * 队尾标识
     */
    public static final String LIST_TAIL = "1";

    /**
     * token请求头名称
     */
    public final static String TOKEN_HEADER = "Authorization";

    /**
     * 登录方式请求头名称
     */
    public final static String LOG_TYPE_HEADER = "platform";

    /**
     * 登录错误次数
     */
    public static final Integer loginErrorCount = 3;

    /**
     * 账户锁定次数
     */
    public static final Integer loginLockCount = 6;

    /**
     * 账户锁定时间（秒）
     */
    public static final Integer loginLocktime = 300;

    /**
     * 账户锁定失效时间（秒->24h）
     */
    public static final Integer loginLockExpiretime = 86400;

    /**
     * 新闻默认点击量
     */
    public static final Integer NEWS_DEFAULT_CLICK = 0;

    /**
     * 视频审核人权限
     */
    public static final String VIDEO_AUDITOR_PERMISSIONS = "resource:audit:update";

    /**
     * 报名审核人权限
     */
    public static final String ENROLL_AUDITOR_PERMISSIONS = "audit:enroll:update";


    /**
     * 报名批量审核权限
     */
    public static final String ENROLL_AUDITOR_BATCH_PERMISSIONS = "audit:enroll:updateBatch";

    /**
     * 调出审核菜单权限
     */
    public static final String MOVERECORD_AUDITOR_PERMISSIONS = "user:audit:page";

    /**
     * 新增用户审核菜单权限
     */
    public static final String USERADD_AUDITOR_PERMISSIONS = "userAdd:audit:page";

    /**
     * 学员请假审核菜单权限
     */
    public static final String LEAVE_AUDITOR_PERMISSIONS = "audit:leave:page";

    /**
     * 反馈意见菜单处理按钮权限
     */
    public static final String FEEDBACK_PERMISSIONS = "feedback:update";

    /**
     * 评论管理菜单处理按钮权限
     */
    public static final String COMMENT_PERMISSIONS = "comment:display";

    /**
     * 办班计划-新增按钮权限
     */
    public static final String CLASS_REPORT_PLAN_SAVE = "classReportPlan:save,user:getDept";

    /**
     * 办班审核-菜单列表按钮权限
     */
    public static final String CLASS_REPORT_PAGE = "classReport:page";

    /**
     * 专题审核-审核按钮权限
     */
    public static final String SPECIAL_AUDIT = "topicLecture:specialBatchAudit";

    /**

    /**
     * 上级选调函-菜单列表按钮权限
     */
    public static final String SELECTION_LETTER_PAGE = "selectionLetter:page";

    /**
     * STS token失效最短时间 900s
     */
    public static final Long OSS_STS_MIN_DURATION = 900L;
    /**
     * STS token失效时间 默认最大值 3600s
     */
    public static final Long OSS_STS_MAX_DEFAULT_DURATION = 3600L;
    /**
     * STS SESSION 最大session时间 43200s 用于设置token的上限失效时间
     */
    public static final Long OSS_STS_MAX_SESSION_DURATION = 43200L;

    /**
     * 顶级部门等级编号
     */
    public static final String TOP_DEPT_LEVEL_CODE = "001";

    /**
     * 联络员角色编号
     */
    public static final String LIAISON_ROLE_CODE = "003";

    /**
     * 学院部门等级
     */
    public static final Integer COLLEGE_DEPT_LEVEL = 1;

    /**
     * 最初的部门等级
     */
    public static final Integer FIRST_DEPT_LEVEL = 0;

    /**
     * 短信验证码发送间隔时间（秒）
     */
    public static final Long SMS_INTERVAL_TIME = 60L;

    /**
     * 短信验证码有效期（秒）
     */
    public static final Long SMS_VALIDITY_TIME = 300L;

    /**
     * 同一IP发送短信次数上限
     */
    public static final Integer SMS_SAMEIP_MAX_COUNT = 100;

    /**
     * 第三方服务入库记录值
     */
    public static final String THIRD_PARTY_SERVICES = "1";

    /**
     * 接口幂等性token名称
     */
    public static final String TOKEN_NAME = "token";

    /**
     * 观看视频统计延迟时间（秒）
     */
    public static final Long WATCH_VIDEO_TIME = 300L;

    /**
     * 学习100%进度
     */
    public static final Integer FINISH_PROGRESS = 100;

    /**
     * 学习进度达标进度
     */
    public static final Integer STANDARD_PROGRESS = 95;

    /**
     * 考核结束年龄
     */
    public static final Integer EXAM_END_AGE = 60;

    /**
     * 时序数据库视频点位表
     */
    public static final String INFLUXDB_VIDEO_POINT = "video_point";

    /**
     * 时序数据库视频点位表
     */
    public static final String INFLUXDB_AUDIO_POINT = "audio_point";

    /**
     * web端
     */
    public static final String PLATFORM_WEB = "web";

    /**
     * app端
     */
    public static final String PLATFORM_APP = "app";

    /**
     * 浙政钉小程序
     */
    public static final String PLATFORM_DING = "ding";

    /**
     * 播放检验周期（秒）
     */
    public static final Long PLAY_CHECK_TIME = 5L;

    /**
     * 班级作业、学员作业附件存储路径
     */
    public static String classWorkPath = "class/work/";
    /**
     * 班级学员请假审核附件存储路径
     */
    public static String classLeavePath = "class/leave/";

    /**
     * 班级学员入学通知书附件存储路径
     */
    public static String classNoticePath = "class/notice/";

    /**
     * 入学通知书短信发送早上不发送消息的判断时间  00-08
     */
    public static String SMS_NOTICE_AM_TIME = "00-08";

    /**
     * 入学通知书短信晚上不发送消息的判断时间  20-24
     */
    public static String SMS_NOTICE_PM_TIME = "20-24";

    /**
     * 本年度网络培训学时黄码判断时间 10-01
     */
    public static final String ONLINE_EXAM_YELLOW_TIME = "10-01";

    /**
     * 本年度网络培训学时红码判断时间 12-20
     */
    public static final String ONLINE_EXAM_RED_TIME = "12-20";

    /**
     * APP轮播图
     */
    public static final String REDIS_CAROUSEL_APP = "ZJCE:SYS:BANNER:APP";

    /**
     * WEB轮播图
     */
    public static final String REDIS_CAROUSEL_WEB = "ZJCE:SYS:BANNER:WEB";

    /**
     * 转换数据以K的格式
     */
    public static final Integer FORMAT_UNIT = 1000;

    /**
     * 最新上线资源缓存数量限制
     */
    public static final Integer LAST_ONLINE_CACHE_LIMIT = 3;

    /**
     * DING轮播图
     */
    public static final String REDIS_CAROUSEL_DING = "ZJCE:SYS:BANNER:DING";

    public static class CacheKey {
        // redis 重置重复监听key 锁
        public static final String REDIS_LISTENER_LOCK_SUFFIX = "ZJCE:LISTENER:LOCK:";
        public static final String REDIS_LOCK_VALUE = "LOCK";
        public static final long REDIS_LOCK_TIME_OUT = 10;

        // 接口幂等性token缓存过期时间一天
        public static final long TOKEN_TIME_OUT_DAY = 24 * 60 * 60L;
        // 缓存过期时间-30分钟
        public final static long REDIS_TIME_OUT_30MINUTES = TOKEN_TIME_OUT_DAY * 7;
        // 不过期
        public final static long REDIS_NOT_EXPIRE = -1;

        // 数据幂等
        public static final String REDIS_LOCK_DATA = "ZJCE:LOCK:DATA:";
        public static final long REDIS_LOCK_DATA_TIME_OUT = 30;

        // ================================== 登录相关key===================================
        // 登录失败锁定的key
        public static final String REDIS_LOGIN_ATTEMPTS = "ZJCE:LOGIN:ATTEMPTS:PWD:";
        // 登录失败冻结的key
        public static final String REDIS_LOGIN_LOCKED = "ZJCE:LOGIN:LOCKED:PWD:";
        // 登录验证码
        public static final String REDIS_LOGIN_VALIDATE = "ZJCE:LOGIN:VALIDATE:PWD:";
        // 登录验证码供前端cookie使用
        public static final String COOKIE_LOGIN_VALIDATE = "zjce_login_validate_pwd";

        // 短信验证码登录失败锁定的key
        public static final String REDIS_SMS_LOGIN_ATTEMPTS = "ZJCE:LOGIN:ATTEMPTS:SMS:";
        // 短信验证码登录失败冻结的key
        public static final String REDIS_SMS_LOGIN_LOCKED = "ZJCE:LOGIN:LOCKED:SMS:";
        // 验证码登录的短信验证码
        public static final String REDIS_SMS_LOGIN_CODE = "ZJCE:LOGIN:CODE:SMS:";
        // 发送登录验证码的验证码
        public static final String REDIS_SMS_LOGIN_VALIDATE = "ZJCE:LOGIN:VALIDATE:SMS:";
        // 发送登录验证码的验证码供前端cookie使用
        public static final String COOKIE_SMS_LOGIN_VALIDATE = "zjce_login_validate_sms";

        // 二维码登录
        public static final String REDIS_LOGIN_QRCODE = "ZJCE:LOGIN:RQCODE:SMS:";
        // 二维码登录供前端cookie使用
        public static final String COOKIE_LOGIN_QRCODE = "zjce_login_rqcode_sms";
        // 登录成功的token
        public static final String REDIS_LOGIN_ACCESS_TOKEN = "ZJCE:LOGIN:ACCESS:TOKEN:";
        // 后台登录成功的token
        public static final String REDIS_LOGIN_ACCESS_TOKEN_MANAGE = "ZJCE:LOGIN:ACCESS:TOKEN:MANAGE:";

        // 登录类型
        public static final String REDIS_LOGIN_TYPE = "ZJCE:LOGIN:TYPE:";

        // 登录默认角色id
        public static final String REDIS_LOGIN_DEFAULT_ROLE_ID = "ZJCE:LOGIN:DEFAULT:ROLE:ID";

        // 私钥
        // 私钥cookie
        public static final String LOGIN_SESSION = "SESSION_ID";
        public static final String REDIS_LOGIN_PEIVATE_KEY_MODULUS = "ZJCE:LOGIN:PEIVATE_KEY:MODULUS:";
        public static final String REDIS_LOGIN_PEIVATE_KEY_PRIVATE = "ZJCE:LOGIN:PEIVATE_KEY:PRIVATE:";

        // ====================================数据字典key==========================================

        public static final String REIDS_SYS_PARAM_DATA = "ZJCE:SYS:PARAM:DATA:";
        public static final String REDIS_SYS_PARAM_NAMEKEY = "ZJCE:SYS:PARAM:NAMEKEY:";

        // 阿里云 STS 文件上传token
        public static final String REDIS_OSS_STS_TOKEN = "ZJCE:OSS:STS:TOKEN";

        // 华为云 文本审核 鉴权token
        public static final String REDIS_HUAWEI_MODERATION_TOKEN = "ZJCE:HUAWEI:MODERATION:TOKEN";

        // ====================================门户考试key==========================================
        // 考试答题记录缓存key
        public static final String REDIS_EXAM_BATCH_CACHE = "ZJCE:EXAM:BATCH:CACHE:";
        // 考试定时器
        public static final String REDIS_EXAM_BATCH_TIMER = "ZJCE:EXAM:BATCH:TIMER:";
        // 考试答题锁
        public static final String REDIS_EXAM_LOCK_SUFFIX = "ZJCE:EXAM:LOCK:";
        // 调查答题锁
        public static final String REDIS_INVEST_LOCK_SUFFIX = "ZJCE:INVEST:LOCK:";

        // ====================================后台考试key==========================================
        // 考试分数段缓存key
        public static final String REDIS_EXAM_CREDIT = "ZJCE:EXAM:CREDIT:";

        // ==================================忘记密码及短信验证码相关key===================================
        // 同一IP发送短信次数
        public static final String REDIS_SMS_SAMEIP_COUNT_ = "ZJCE:SMS:SAMEIP:COUNT:";
        // 同一手机号发送短信次数
        public static final String REDIS_SMS_SAMEPHONE_COUNT_ = "ZJCE:SMS:SAMEPHONE:COUNT:";
        // 忘记密码尝试次数
        public static final String REDIS_FORGET_ATTEMPTS = "ZJCE:FORGET:ATTEMPTS:";
        // 忘记密码失败锁定的key
        public static final String REDIS_FORGET_LOCKED = "ZJCE:FORGET:LOCKED:";
        // 忘记密码的短信验证码
        public static final String REDIS_SMS_FORGET_CODE = "ZJCE:FORGET:SMS:CODE:";
        // 发送忘记密码验证码的验证码
        public static final String REDIS_SMS_FORGET_VALIDATE = "ZJCE:FORGET:VALIDATE:SMS:";
        // 发送忘记密码验证码的验证码供前端cookie使用
        public static final String COOKIE_SMS_FORGET_VALIDATE = "zjce_forget_validate_sms";
        // 修改手机号失败锁定的key
        public static final String REDIS_UPDMOBILE_LOCKED = "ZJCE:UPDMOBILE:LOCKED:";
        // 修改手机号尝试次数
        public static final String REDIS_UPDMOBILE_ATTEMPTS = "ZJCE:UPDMOBILE:ATTEMPTS:";
        // 修改手机号的短信验证码
        public static final String REDIS_SMS_UPDMOBILE_CODE = "ZJCE:UPDMOBILE:SMS:CODE:";

        // ==================================接口幂等性token前缀========================================
        public static final String REDIS_API_TOKEN_PREFIX = "ZJCE:API:TOKEN:";

        // ================================角色部门信息缓存key===========================================
        public static final String REDIS_SYS_ROLE_MENU_KEY = "ZJCE:SYS:ROLE:MENU:";
        public static final String REDIS_SYS_ROLE_TREE_KEY = "ZJCE:SYS:ROLE:TREE:";
        public static final String REDIS_SYS_ROLE_USER_KEY = "ZJCE:SYS:ROLE:USER:";
        public static final String REDIS_SYS_USER = "ZJCE:SYS:USER";
        public static final String REDIS_SYS_DEPT_NAME = "ZJCE:SYS:DEPT:NAME";
        public static final String REDIS_SYS_DEPT_LEVEL = "ZJCE:SYS:DEPT:LEVEL";
        public static final String REDIS_SYS_DEPT_INFO = "ZJCE:SYS:DEPT:INFO";
        // 第三方用户id
        public static final String REDIS_SYS_OTHER_USER = "ZJCE:SYS:OTHER:USER";
        // 学院学分规则
        public static final String REDIS_SYS_EXAM_CREDIT = "ZJCE:SYS:EXAM:CREDIT";
        // 培训码规则
        public static final String REDIS_SYS_CODE_RULE = "ZJCE:SYS:CODE:RULE:";
        // ================================资源分类相关缓存key===========================================
        // 资源分类列表
        public static final String REDIS_RES_CATEGORY = "ZJCE:RES:CATE";
        // 专区配置列表
        public static final String REDIS_RES_REGION_CONFIG = "ZJCE:RES:REGION:CONFIG:";
        // 配置中心列表
        public static final String REDIS_RES_CONFIG_INFO = "ZJCE:RES:CONFIG:INFO:";
        // 资源点赞数key前缀 + 资源类型（USER_LIKE_TYPE：1评论 2视频 3 期刊文章）+ bizId（资源ID）
        public static final String REDIS_RES_LIKE_NUM = "ZJCE:RES:LIKE:NUM:";
        // 用户资源点赞key前缀 + today {资源类型（USER_LIKE_TYPE：1评论 2视频 3 期刊文章）+ bizId（资源ID）+ userId}
        public static final String REDIS_RES_LIKE_USER = "ZJCE:RES:LIKE:USER:";

        // ====================================统计播放量、人数、阅读量、点击量==========================
        // 视频在线观看用户
        public static final String REDIS_COUNT_VIDEO_ONLINE = "ZJCE:COUNT:VIDEO:ONLINE:";
        // 视频今日播放用户
        public static final String REDIS_COUNT_VIDEO_PLAY = "ZJCE:COUNT:VIDEO:PLAY:";
        // 视频今日播放用户
        public static final String REDIS_COUNT_AUDIO_PLAY = "ZJCE:COUNT:AUDIO:PLAY:";
        // 新闻今日点击用户
        public static final String REDIS_COUNT_NEWS_CLICKS = "ZJCE:COUNT:NEWS:CLICKS:";
        // 期刊今日点击用户
        public static final String REDIS_COUNT_PERIODICAL_CLICKS = "ZJCE:COUNT:PERIODICAL:CLICKS:";
        // 图书今日阅读用户
        public static final String REDIS_COUNT_BOOK_PLAY = "ZJCE:COUNT:BOOK:PLAY:";

        // ====================================播放校验==========================
        // 播放校验
        public static final String REDIS_PLAY_CHECK = "ZJCE:PLAY:CHECK:";

        // ====================================用户学习进度=========================================
        // 用户视频学习进度
        public static final String REDIS_PROGRESS_VIDEO = "ZJCE:PROGRESS:VIDEO:";
        // 用户视频今日学习记录
        public static final String REDIS_PROGRESS_VIDEO_RECORD = "ZJCE:PROGRESS:VIDEO:RECORD:";
        // 用户音频学习进度
        public static final String REDIS_PROGRESS_AUDIO = "ZJCE:PROGRESS:AUDIO:";
        // 用户音频今日学习记录
        public static final String REDIS_PROGRESS_AUDIO_RECORD = "ZJCE:PROGRESS:AUDIO:RECORD:";
        // 用户视频集学习进度
        public static final String REDIS_PROGRESS_VIDEO_SET = "ZJCE:PROGRESS:VIDEO:SET";

        // ====================================用户学分===========================================
        // 用户视频学分
        public static final String REDIS_CREDIT_VIDEO_USER = "ZJCE:CREDIT:VIDEO:USER";
        // 视频设置的学分
        public static final String REDIS_CREDIT_VIDEO_CONFIG = "ZJCE:CREDIT:VIDEO:CONFIG";
        // 学院配置的视频学分
        public static final String REDIS_CREDIT_VIDEO_COLLEGE = "ZJCE:CREDIT:VIDEO:COLLEGE:";
        // 用户音频学分
        public static final String REDIS_CREDIT_AUDIO_USER = "ZJCE:CREDIT:AUDIO:USER";
        // 学院配置的音频学分
        public static final String REDIS_CREDIT_AUDIO_COLLEGE = "ZJCE:CREDIT:AUDIO:COLLEGE:";

        // ====================================班级===========================================
        // 线下班级大小班对应关系
        public static final String REDIS_CLASS_PARENT_MAPPING = "ZJCE:CLASS:PARENT:MAPPING:";

        // ====================================活跃度统计=========================================
        // 活跃度统计
        public static final String REDIS_ACTIVITY_WEB = "ZJCE:ACTIVITY:WEB:";
        public static final String REDIS_ACTIVITY_APP = "ZJCE:ACTIVITY:APP:";
        public static final String REDIS_ACTIVITY_DING = "ZJCE:ACTIVITY:DING:";
        public static final String REDIS_ACTIVITY_DING_WEB = "ZJCE:ACTIVITY:DING:WEB:";

        // ====================================中网院对接=========================================
        // 中网院对接签名
        public static final String REDIS_ZWY_SIGN = "ZJCE:ZWY:SIGN";
        // 中网院对接token
        public static final String REDIS_ZWY_TOKEN = "ZJCE:ZWY:TOKEN";
        // 中网院token 缓存过期时间12小时
        public static final long ZWY_TOKEN_TIME_OUT = 12 * 60 * 60L;

        // ====================================党校平台对接=========================================
        // 网院平台颁发给三方api对接密钥key
        public static final String REDIS_CLIENT_SECRET = "ZJCE:CLIENT:SECRET";
        // 三方api对接颁发的token和密钥key
        public static final String REDIS_CLIENT_API_TOKEN = "ZJCE:CLIENT:API:TOKEN:";
        // 三方api对接颁发的token和密钥key 缓存过期时间7000s
        public static final long PARTY_API_TOKEN_TIME_OUT = 7000;
        // 三方api对接颁发的临时访问令牌
        public static final String REDIS_CLIENT_ACCESS_TOKEN = "ZJCE:CLIENT:ACCESS:TOKEN:";
        //轮训班和党校专题班学员报到key
        public static final String REDIS_CLASS_PARTY_CLOCK = "ZJCE:CLASS:PARTY:CLOCK:";

        // ====================================浙政钉对接=========================================
        // 浙政钉小程序accessToken
        public static final String ZHE_REDIS_ACESS_TOKEN = "ZJCE:LOGIN:ZHE:ACCESS:TOKEN";
        // 浙里学习扫码登录accessToken
        public static final String ZJCE_SCAN_REDIS_ACESS_TOKEN = "ZJCE:LOGIN:SCAN:ACCESS:TOKEN";
        // 浙政钉小程序jsapiAccessToken
        public static final String ZHE_REDIS_JSAPI_ACESS_TOKEN = "ZJCE:LOGIN:ZHE:JAAPI:TOKEN";
        // 浙政钉颁发的token缓存过期时间7000s
        public static final long ZHE_REDIS_TOKEN_TIME_OUT = 7000;
        // 浙政钉颁发的jsapiAccessToken缓存过期时间
        public static final long ZHE_JAAPI_REDIS_TOKEN_TIME_OUT = 4500;

        // =======================================================================================
        // 最新上线视频
        public static final String REDIS_LATEST_ONLINE_VIDEO = "ZJCE:LATEST:ONLINE:VIDEO:";
        // 最新上线新闻与文章
        public static final String REDIS_LATEST_ONLINE_NEWS_ARTICLE = "ZJCE:LATEST:ONLINE:NEWS:ARTICLE:";
        // 云讲堂课程
        public static final String REDIS_LATEST_ONLINE_YJT = "ZJCE:LATEST:ONLINE:YJT:";

        /**
         * app缓存key
         */
        public static class APP {
            // app 参数加密解密
            public static final String MODULES_STR = "a966b144d42689ab0ffe235d4821a1fc2bdfc94868b4822d8a1da65ae0922a73ec79428621b7dbfc36f3aee79f9e2e4fc048eb591230354ff5afc205fbc8a35540d70148001d67e6c21b55832aff54d5f57d3d64922fa5de0dce8edba4aa2c42285f59347b26d27b20ae5074a124f3711e273b3456fa7d82ba494375b649b18f";
            public static final String MODULES_ = "118957527634769460612895427301286295021078762158351565568044331846959102886594224317775227936226695694935667968390821779323470575540790489077363262553273008081418147480448705974217363894164034002927942020627055352360879642636339696134537394210561166021547195342884147656855831182053108812406561073777055740303";
            public static final String PRIVATE_EXPONENT = "12224531522125921575869334172090264266767301168441309013837230382846764394017593141932494076310543525887807413966422828022547371426389680315768629620202349056783538894459576150131418766796190343551072872995065139671798831758527898425308777723618359435138988057595918025257343900082242644729665690816145174729";

            // ==================================
            // APP登录相关key===================================
            // 手机登录验证码
            public static final String LOGIN_VALIDATE_SMS = "APP:LOGIN:VALIDATE:SMS:";

            // 账号锁定key
            public static final String LOGIN_ATTEMPTS = "APP:LOGIN:ATTEMPTS:";
            // 登录失败冻结的key
            public static final String LOGIN_LOCKED = "APP:LOGIN:LOCKED:";
            // 登录成功的token
            public static final String LOGIN_ACCESS_TOKEN = "APP:LOGIN:ACCESS:TOKEN:";
            // 一分钟验证码发送限制
            public static final String LOGIN_CODE_ATTEMPTS = "APP:LOGIN:CODE:ATTEMPTS:";

            // ==================================
            // APP修改密码相关key===================================
            // 手机修改密码验证码
            public static final String PASSWORD_VALIDATE_SMS = "APP:PASSWORD:VALIDATE:SMS:";
            // 一分钟验证码发送限制
            public static final String PASSWORD_CODE_ATTEMPTS = "APP:PASSWORD:CODE:ATTEMPTS:";
            // 忘记密码失败锁定的key
            public static final String REDIS_PASSWORD_LOCKED = "APP:PASSWORD:LOCKED:";
            // APP用户培训码提醒的key
            public static final String REDIS_CODE_REMIND = "APP:CODE:REMIND:";

            // ==================================== app 个人中心=========================================
            // app个人中心中网院path
            public static final String APP_ZWY_PATH = "WebViewScreen";
            // app个人中心请假管理key
            public static final String APP_LEAVE_MANAGE = "enrollment:saveOrUpdate";
            // app个人中心请假管理path
            public static final String APP_LEAVE_MANAGE_PATH = "SelectClass";
            // app个人中心班级管理path
            public static final String APP_CLASS_MANAGE_PATH = "ClassManage";
            // app班级管理学员名单path
            public static final String APP_ENROLL_MANAGE_PATH = "StudentManage";
            // app班级管理请假审核path
            public static final String APP_LEAVE_APPROVAL_PATH = "LeaveReview";
        }

        /**
         * 浙政钉缓存key
         */
        public static class DING {
            // DING登录成功的token
            public static final String LOGIN_ACCESS_TOKEN = "DING:LOGIN:ACCESS:TOKEN:";
        }
    }

    /**
     * 短信通配符
     */
    public static class SmsWildcardFormat {
        /**
         * 学员姓名：{Name} 手机号码：{Phone} 学员ID：{UserId} 联络员姓名：{Liaison} 学习课件：{CourseWare}
         * 阅读图书：{Book} 音频：{Audio} 总学分：{CountScore} 达标学分：{MustScore}必修分：{RequiredCredit}
         * 选修分：{ElectiveCredit} 考核剩余天数：{RemaindCheckDay} 网络学院地址：{AcademyUrl}
         * 网络学院落款：{AcademyName} 办班申报名称：{reportName} 申报结束时间：{reportEndTime}
         */
        // 学员姓名：{Name}
        public static final String SMS_TO_USER_NAME = "{Name}";

        // 手机号码：{Phone}
        public static final String SMS_TO_USER_MOBILE = "{Phone}";

        // 学员ID：{UserId}
        public static final String SMS_TO_USER_ID = "{UserId}";

        // 联络员姓名：{Liaison}
        public static final String SMS_LIAISON = "{Liaison}";

        // 学习课件：{CourseWare}
        public static final String SMS_COURSE_WARE = "{CourseWare}";

        // 阅读图书：{Book}
        public static final String SMS_BOOK = "{Book}";

        // 音频：{Audio}
        public static final String SMS_AUDIO = "{Audio}";

        // 总学分：{CountScore}
        public static final String SMS_COUNT_SCORE = "{CountScore}";

        // 达标学分：{MustScore}
        public static final String SMS_MUST_SCORE = "{MustScore}";

        // 必修分：{RequiredCredit}
        public static final String SMS_REQUIRED_CREDIT = "{RequiredCredit}";

        // 选修分：{ElectiveCredit}
        public static final String SMS_ELECTIVE_CREDIT = "{ElectiveCredit}";

        // 考核剩余天数：{RemaindCheckDay}
        public static final String SMS_REMAIND_CHECK_DAY = "{RemaindCheckDay}";

        // 网络学院地址：{AcademyUrl}
        public static final String SMS_ACADEMY_URL = "{AcademyUrl}";

        // 网络学院落款：{AcademyName}
        public static final String SMS_ACADEMY_NAME = "{AcademyName}";

        // 办班申报名称：{reportName}
        public static final String SMS_REPORT_NAME = "{reportName}";

        // 申报结束时间：{reportEndTime}
        public static final String SMS_REPORT_END_TIME = "{reportEndTime}";

    }

    /**
     * 选调函通配符
     */
    public static class TransferWildcardFormat {
        // 学员姓名：{userName}
        public static final String TRANSFER_USER_NAME = "{userName}";
        // 班级年份：{classYear}
        public static final String TRANSFER_CLASS_YEAR = "{classYear}";
        // 班级名称：{className}
        public static final String TRANSFER_CLASS_NAME = "{className}";
        // 班级学制：{trainDays}
        public static final String TRANSFER_TRAIN_DAYS = "{trainDays}";
        // 培训开始时间：{trainStartTime}
        public static final String TRANSFER_TRAIN_START_TIME = "{trainStartTime}";
        // 培训结束时间：{trainEndTime}
        public static final String TRANSFER_TRAIN_END_TIME = "{trainEndTime}";
        // 承办单位：{undertakeUnit}
        public static final String TRANSFER_UNDERTAKE_UNIT = "{undertakeUnit}";
        // 当天日期：{today}
        public static final String TRANSFER_TODAY = "{today}";
    }

    /**
     * es索引
     */
    public static class Elastic {
        // es-日志索引
        public static final String LOG_INDEX = "logs";
        // es-日志索引
        public static final String USER_OPERATE_INDEX = "user_operate";
        // es-视频索引
        public static final String VIDEO_INDEX = "video";
        // es-图书索引
        public static final String BOOK_INDEX = "book";
        // es-期刊索引
        public static final String PERIODICAL_INDEX = "periodical";
        // es-专题索引
        public static final String SUBJECT_INDEX = "subject";
        // es-音频索引
        public static final String AUDIT_INDEX = "audio";
        // es-新闻索引
        public static final String NEWS_INDEX = "news";
        // es-用户历史记录
        public static final String HISTORY_INDEX = "history";
        // es-用户音频进度点位
        public static final String AUDIO_PROGRESS_POINT = "audio_progress_point";
        // es-用户视频进度点位
        public static final String VIDEO_PROGRESS_POINT = "video_progress_point";
        // es-学员培训记录索引
        public static final String STUDENT_TRAIN_INDEX = "student_train";
        // es-用户学分统计索引
        public static final String USER_CREDIT_INDEX = "user_credit_statistics";
        // es-配置中心师资索引
        public static final String CONFIG_LECTURER_INDEX = "config_lecturer";
    }

    /**
     * es索引
     */
    public static class RocketMQConstant {
        /**
         * 消费群组
         */
        public static final String CONSUMER_GROUP_PRODUCT_CUT_IMAGE = "zjce_consumer_group_product_cut_image"; // 商品图文详情切图

        /**
         * 消费实例
         */
        public static final String CONSUMER_INSTANCE_PRODUCT_CUT_IMAGE = "zjce_consumer_instance_product_cut_image"; // 商品图文详情切图

        /**
         * topic
         */
        // 平台商品富文本图文详情切图
        public static final String TOPIC_PRODUCT_CUT_IMAGE = "zjce_topic_product_cut_image";

        /**
         * tags
         */
        public static final String TAGS_ALL = "*";
    }

    /**
     * 视频相关信息初始化缓存
     */
    public static class redisParams {
        // 用户信息保存至缓存
        public static final String USER_TO_REDIS = "user";
        // 缓存部门信息
        public static final String DEPT_TO_REDIS = "dept";
        // 缓存学分规则
        public static final String CREDIT_RULE_TO_REDIS = "credit_rule";
        // 缓存学分考核规则
        public static final String EXAM_CREDIT_TO_REDIS = "exam_rule";
        // 缓存视频配置学分规则
        public static final String VIDEO_TO_REDIS = "video_to_redis";
        // 缓存角色菜单
        public static final String ROLE_MENU_TO_REDIS = "role";
        // 用户角色缓存
        public static final String USE_ROLE_TO_REDIS = "use_role";
    }

    /**
     * 用户登录平台(加密)
     */
    public static class loginParams {
        // 门户 MD5(WEB)
        public static final String WEB = "bc1f55f482a2df2bede07c661806c4eb";
        // 后台 MD5(MANAGE)
        public static final String MANAGE = "92814a387d2fe972e8aa877bc152980c";
        // app MD5(APP)
        public static final String APP = "0bdbb2c325525e986d55ef50ca66d056";
        // ding MD5(DING)
        public static final String DING = "8376f1bb052fb9ba5dd73b1b10ebd231";
        // APP_H5 MD5(APP_H5)
        public static final String APP_H5 = "93d89633c9e76ed593941e9586bdfa73";
    }

    // app返回数据加密密钥:MD5(AESEncryptionCut)
    public static final String ENCRYPT_PASSWORD = "1849a5de72af0642cc3a9d0fee9b757a";

    /**
     * 绿码提醒类型
     */
    public static final String GREEN_CODE_REMIND = "GREEN_CODE_REMIND";

    /**
     * 黄码提醒类型
     */
    public static final String YELLOW_CODE_REMIND = "YELLOW_CODE_REMIND";

    /**
     * 绿码提醒类型
     */
    public static final String RED_CODE_REMIND = "RED_CODE_REMIND";

    /**
     * 未参与班级培训情况
     */
    public static final String NO_CLASS = "0/0";

    /**
     * 某项未考核
     */
    public static final String NO_EXAM = "不考核";

    /**
     * ding进度
     */
    public static final String RATE_OF_PROGRESS = "进度";

    /**
     * 浙里学习-部门等级编号
     */
    public static final String ZHE_LI_LEARN_DEPT_LEVEL_CODE = "001001";

    /**
     * 机关分院-部门等级编号
     */
    public static final String OFFICE_BRANCH_DEPT_LEVEL_CODE = "001002";

    /**
     * 企业分院-部门等级编号
     */
    public static final String BUSINESS_BRANCH_DEPT_LEVEL_CODE = "001003";

    /**
     * 高校分院-部门等级编号
     */
    public static final String SCHOOL_BRANCH_DEPT_LEVEL_CODE = "001004";

    public static final Map<String, String> DEPT_LEVEL_CODE_MAP = new HashMap<String, String>(){{
        put("001001", "浙里学习");
        put("001002", "机关分院");
        put("001003", "企业分院");
        put("001004", "高校分院");
        put("001005", "丽水分院");
        put("001006", "杭州分院");
        put("001007", "宁波分院");
        put("001008", "温州分院");
        put("001009", "嘉兴分院");
        put("001010", "湖州分院");
        put("001011", "绍兴分院");
        put("001012", "金华分院");
        put("001013", "衢州分院");
        put("001014", "舟山分院");
        put("001015", "台州分院");
    }};


    /**
     * 前后端考试时长计时差值（单位：秒）
     */
    public static final Integer DIFFER_EXAM_LIMIT_TIME = 30;
}
